using SeetaFace6Sharp;
using System.Diagnostics;
using System.Drawing;

namespace seetademo
{
    public partial class Form1 : Form
    {

        FaceDetector faceDetector;
        FaceLandmarker faceMark;
        FaceRecognizer faceRecognizer;
        private float[] data0;
        private float[] data1;

        public Form1()
        {
            InitializeComponent();

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            faceDetector = new FaceDetector();
            faceMark = new FaceLandmarker();
            faceRecognizer = new FaceRecognizer();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Stopwatch sw = Stopwatch.StartNew();
            var img=Bitmap.FromFile("D:\\aaa.jpg");
            var facedata = new Bitmap(img).ToFaceImage();
            for (int i = 0; i < 10; i++)
            {
                FaceInfo[] infos0 = faceDetector.Detect(facedata);
            }
            sw.Stop();
            Trace.WriteLine(sw.Elapsed);
        }
    }
}
